#ifndef VECTOR_H
#define VECTOR_H

#include <iostream>

class Vector
{
	private:
		float v[3];
	public:
		Vector();
		Vector(float x, float y, float z);
		Vector::Vector(const Vector &vec);
		
		float &operator[](int index);
		float operator[](int index) const;
		
		Vector operator*(float scale) const;
		Vector operator/(float scale) const;
		Vector operator+(const Vector &other) const;
		Vector operator-(const Vector &other) const;
		Vector operator-() const;
		
		const Vector &operator*=(float scale);
		const Vector &operator/=(float scale);
		const Vector &operator+=(const Vector &other);
		const Vector &operator-=(const Vector &other);
		const bool Vector::operator==(const Vector &other);
		const bool Vector::operator==(float number);
		
		float magnitude() const;
		float magnitudeSquared() const;
		Vector normalize() const;
		float dot(const Vector &other) const;
		Vector cross(const Vector &other) const;
};

Vector operator*(float scale, const Vector &v);
std::ostream &operator<<(std::ostream &output, const Vector &v);

#endif //VECTOR_H